//Source file: D:\\aaa\\com\\ce\\pms\\renovation\\model\\RenovateRequisitionDO.java

package com.ce.pms.renovation.model;

import java.math.BigDecimal;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.AttributeOverride;
import javax.persistence.Column;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.Where;

import com.ce.pms.common.model.SysInfo;
import com.ce.pms.house.model.HouseDomain;
import com.sitechasia.webx.core.model.IDomainObject;

/**
 * 实体名称:装修申请 关联数据表:RM_RENOVATE_REQUISITION
 *
 * @author yandawei
 * @CreateDate:2008-12-17
 */
@Entity
@Table(name = "RM_RENOVATE_REQUISITION")
public class RenovateRequisitionDO implements IDomainObject {

	/**
	 *
	 */
	private static final long serialVersionUID = 3014161278111965438L;

	/**
	 * 主键
	 */
	@Id
	@GeneratedValue
	@Column(name = "RENOVATE_REQUISITION_ID")
	private Long keyword;

	/**
	 * 装修申请单号
	 */
	@Column(name = "REQUISITION_NUMBER", length = 13)
	private String requisitionNumber;

	/**
	 * 房间
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "HOUSE_ID")
	private HouseDomain house;

	/**
	 * 客户姓名，多业主用,分开
	 */
	@Column(name = "CLIENT_NAMES", length = 36)
	private String clientNames;

	/**
	 * 联系人
	 */
	@Column(name = "LINK_MAN", nullable = false, length = 36)
	private String linkman;

	/**
	 * 联系电话
	 */
	@Column(name = "LINK_MAN_PHONE", nullable = false, length = 30)
	private String linkManPhone;

	/**
	 * 装修面积
	 */
	@Column(name = "AREA", nullable = false, precision = 12, scale = 2)
	private BigDecimal area = new BigDecimal(0.00);

	/**
	 * 装修类型 001-自装，002-装修公司承接装修
	 */
	@Column(name = "RENOVATE_TYPE", nullable = false, length = 3)
	private String renovateType;

	/**
	 * 装修承建商名字
	 */
	@Column(name = "COMPANY_NAME", length = 36)
	private String companyName;

	/**
	 * 装修商资质等级
	 */
	@Column(name = "LEVEL", length = 50)
	private String level;

	/**
	 * 现场责任人
	 */
	@Column(name = "BURDEN_MAN", nullable = false, length = 36)
	private String burdenMan;

	/**
	 * 现场负责人电话
	 */
	@Column(name = "BURDEN_MAN_PHONE", nullable = false, length = 30)
	private String burdenManPhone;

	/**
	 * 装修项目
	 */
	@Column(name = "ITEMS", nullable = false, length = 200)
	private String items;

	/**
	 * 身份证
	 */
	@Column(name = "IDENTITY_CARD", length = 36)
	private String identityCard;

	/**
	 * 费用状态 001-未收，002-免收，003-已收
	 */
	@Column(name = "FEE_STATE",nullable = false, length = 3)
	private String feeState;

	/**
	 * 是否已进场确认 1-yes, 0-no
	 */
	@Column(name = "CHECK_CONFIRM_YN",length = 1)
	private String checkConfirmYn;

	/**
	 * 装修申请日期
	 */
	@Temporal(TemporalType.DATE)
	@Column(name = "REQUISITION_DATE", nullable = false)
	private Date requisitionDate;

	/**
	 * 防火负责人
	 */
	@Column(name = "FIREPROOFING_MAN", nullable = false, length = 36)
	private String fireproofingMan;

	/**
	 * 装修开工日期
	 */
	@Temporal(TemporalType.DATE)
	@Column(name = "BEGIN_DATE", nullable = false)
	private Date beginDate;

	/**
	 * 装修结束日期
	 */
	@Temporal(TemporalType.DATE)
	@Column(name = "END_DATE", nullable = false)
	private Date endDate;

	/**
	 * 备注
	 */
	@Column(name = "REMARK", length = 200)
	private String remark;

	/**
	 * 装修申请状态 001-新建，002-待审批，003-审批中，004-审批通过，005-审批不通过
	 */
	@Column(name = "REQUISITION_STATE", length = 3)
	private String requisitionState;

	/**
	 * 装修进程状态 001-申办，002-监管，003-验收，004-退保证金，005-正常完 结，006-异常完结
	 */
	@Column(name = "PROCESS_STATE", length = 3)
	private String processState;

	/**
	 * 许可证收费项目
	 */
	@OneToMany(mappedBy = "renovateRequisition")
	@Where(clause = "CHARGE_ITEM_TYPE='001'")
	public Set<RenovateChargeItemDO> renovateChargeItemDOSet = new HashSet<RenovateChargeItemDO>();

	/**
	 * 系统信息
	 */
	@Embedded
	@AttributeOverride(name="sysDate",column=@Column(name="SYS_DATE"))
	private SysInfo sysInfo;

	/**
	 * 无参构造子
	 *
	 * @roseuid 493CC070005D
	 */
	public RenovateRequisitionDO() {

	}



	public RenovateRequisitionDO(Long keyword) {
		this.keyword = keyword;
	}



	/**
	 * @param state
	 * @roseuid 493DFEF1037A
	 */
	public void setState(String state) {
		this.setRequisitionState(state);
	}

	public BigDecimal getArea() {
		return area;
	}

	public void setArea(BigDecimal area) {
		this.area = area;
	}

	public Date getBeginDate() {
		return beginDate;
	}

	public void setBeginDate(Date beginDate) {
		this.beginDate = beginDate;
	}

	public String getBurdenMan() {
		return burdenMan;
	}

	public void setBurdenMan(String burdenMan) {
		this.burdenMan = burdenMan;
	}

	public String getBurdenManPhone() {
		return burdenManPhone;
	}

	public void setBurdenManPhone(String burdenManPhone) {
		this.burdenManPhone = burdenManPhone;
	}

	public String getClientNames() {
		return clientNames;
	}

	public void setClientNames(String clientNames) {
		this.clientNames = clientNames;
	}

	public String getCompanyName() {
		return companyName;
	}

	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}

	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	public String getFireproofingMan() {
		return fireproofingMan;
	}

	public void setFireproofingMan(String fireproofingMan) {
		this.fireproofingMan = fireproofingMan;
	}

	public HouseDomain getHouse() {
		return house;
	}

	public void setHouse(HouseDomain house) {
		this.house = house;
	}

	public String getIdentityCard() {
		return identityCard;
	}

	public void setIdentityCard(String identityCard) {
		this.identityCard = identityCard;
	}

	public String getItems() {
		return items;
	}

	public void setItems(String items) {
		this.items = items;
	}

	public Long getKeyword() {
		return keyword;
	}

	public void setKeyword(Long keyword) {
		this.keyword = keyword;
	}

	public String getLevel() {
		return level;
	}

	public void setLevel(String level) {
		this.level = level;
	}

	public String getLinkman() {
		return linkman;
	}

	public void setLinkman(String linkman) {
		this.linkman = linkman;
	}

	public String getLinkManPhone() {
		return linkManPhone;
	}

	public void setLinkManPhone(String linkManPhone) {
		this.linkManPhone = linkManPhone;
	}

	public String getProcessState() {
		return processState;
	}

	public void setProcessState(String processState) {
		this.processState = processState;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public Set<RenovateChargeItemDO> getRenovateChargeItemDOSet() {
		return renovateChargeItemDOSet;
	}

	public void setRenovateChargeItemDOSet(
			Set<RenovateChargeItemDO> renovateChargeItemDOSet) {
		this.renovateChargeItemDOSet = renovateChargeItemDOSet;
	}

	public String getRenovateType() {
		return renovateType;
	}

	public void setRenovateType(String renovateType) {
		this.renovateType = renovateType;
	}

	public Date getRequisitionDate() {
		return requisitionDate;
	}

	public void setRequisitionDate(Date requisitionDate) {
		this.requisitionDate = requisitionDate;
	}

	public String getRequisitionNumber() {
		return requisitionNumber;
	}

	public void setRequisitionNumber(String requisitionNumber) {
		this.requisitionNumber = requisitionNumber;
	}

	public String getRequisitionState() {
		return requisitionState;
	}

	public void setRequisitionState(String requisitionState) {
		this.requisitionState = requisitionState;
	}

	public SysInfo getSysInfo() {
		return sysInfo;
	}

	public void setSysInfo(SysInfo sysInfo) {
		this.sysInfo = sysInfo;
	}

	public String getCheckConfirmYn() {
		return checkConfirmYn;
	}

	public void setCheckConfirmYn(String checkConfirmYn) {
		this.checkConfirmYn = checkConfirmYn;
	}

	public String getFeeState() {
		return feeState;
	}



	public void setFeeState(String feeState) {
		this.feeState = feeState;
	}



}
